package com.example.keli.api;

import com.example.keli.api.http.api.BaseResponse;
import com.example.keli.ui.home.model.DetailUserData;
import com.example.keli.ui.home.model.GoodActorData;
import com.example.keli.ui.home.model.ObjectVo;
import com.example.keli.ui.list.RankData;
import com.example.keli.ui.list.TicketData;
import com.example.keli.ui.register.LoginData;
import com.example.keli.ui.userinfo.AddressData;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

public interface ApiFunction {

    //获取榜单列表
    @FormUrlEncoded
    @POST("getAnnouncement")
    Observable<BaseResponse<RankData>> getAnnouncement(@FieldMap Map<String, String> map);

    //获取参赛者详情
    @FormUrlEncoded
    @POST("getActivityUserInfo")
    Observable<BaseResponse<ObjectVo>> getActivityUserInfo(@FieldMap Map<String, String> map);

    //贡献排行
    @FormUrlEncoded
    @POST("getActorLikeList")
    Observable<BaseResponse<DetailUserData>> getActorLikeList(@FieldMap Map<String, String> map);

    //优秀作品
    @GET("getGoodActor")
    Observable<BaseResponse<GoodActorData>> getGoodActor();

    //点赞和取消
    @FormUrlEncoded
    @POST("setLike")
    Observable<BaseResponse<Object>> setLike(@FieldMap Map<String, String> map);

    //获取榜单投票列表（助力榜）
    @FormUrlEncoded
    @POST("getAnnouncementTicket")
    Observable<BaseResponse<TicketData>> getAnnouncementTicket(@FieldMap Map<String, String> map);

    //获取榜单粉丝列表（粉丝榜）
    @FormUrlEncoded
    @POST("getAnnouncementGift")
    Observable<BaseResponse<TicketData>> getAnnouncementGift(@FieldMap Map<String, String> map);

    //获取七牛token
    @GET("uptokens")
    Observable<BaseResponse<String>> uptokens();

    //设置个人资料
    @FormUrlEncoded
    @POST("setUser")
    Observable<BaseResponse<Object>> setUser(@FieldMap Map<String, String> map);

    //报名参赛
    @FormUrlEncoded
    @POST("sign")
    Observable<BaseResponse<Object>> sign(@FieldMap Map<String, String> map);

    //获取地址列表
    @GET("getUserRegion")
    Observable<BaseResponse<List<AddressData>>> getUserRegion();

    //账号密码注册
    @FormUrlEncoded
    @POST("registered")
    Observable<BaseResponse<Object>> registered(@FieldMap Map<String, String> map);

    //账号密码登录
    @FormUrlEncoded
    @POST("login_a")
    Observable<BaseResponse<LoginData>> login_a(@FieldMap Map<String, String> map);
}
